function mySlice(num1?:number,num2?:number):void {
    console.log('start:'+num1);
    console.log('end:'+num2);
}
mySlice();
mySlice(1,2);
mySlice(1);